package com.fallsvc.re.javasesets.mapandset.hash;

import java.time.LocalDate;
import java.util.Objects;

public class Person {
    private String name;
    private int age;
    private LocalDate birthDate;

    // 构造方法和其他方法...

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || this.getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return age == person.age &&
               Objects.equals(name, person.name) &&
               Objects.equals(birthDate, person.birthDate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, birthDate);
    }
}